fix(android): silence ILLink IL1012 crash and AVIF warning spam in Android release build - #315
Merged
Merged
Conversation
…droid build Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/22ad4886-6c84-4ea8-b975-2654d5b0fbe0 Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…e once, emit single notice Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/fcf5dc5e-2e92-4d0c-8801-1631be372104 Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
winnerspiros
May 8, 2026 19:09
View session
…able on CI runners) Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/1e430bc2-0512-43d3-8f3d-6bea53471ae6 Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
winnerspiros
approved these changes
May 8, 2026
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce noisy/unstable build output in Android Release builds by (1) preventing AVIF conversion attempts when the required encoder isn’t available and (2) avoiding an ILLinker crash triggered by trim-analysis warning emission.
Changes:
- Added a cached
libsvtav1availability probe to the resource optimizer, and gate AVIF conversion on it (with a single upfront notice when unavailable). - Suppressed trim-analysis warnings in Android Release builds to avoid an ILLinker IL1012 fatal crash.
- Disabled
jpeg_avif_enabledin the CI resource-optimizer config to prevent futile AVIF conversion attempts on runners.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
scripts/optimize_resource_overrides.py |
Adds a one-time libsvtav1 probe and uses it to skip AVIF (reducing warning spam). |
osu.Android.props |
Sets SuppressTrimAnalysisWarnings=true in Release to prevent ILLink IL1012 crash. |
.github/resource-optimizer/config.json |
Disables AVIF output in CI resource optimization configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) | ||
| _svtav1_available_cache = True | ||
| except (subprocess.CalledProcessError, FileNotFoundError): | ||
| _svtav1_available_cache = False |
Comment on lines
199
to
203
| ) | ||
| temp_candidates.append((p_avif, f"{src_label}-avif-svtav1-crf{avif_crf}-p{avif_preset}", False, ".avif")) | ||
| except subprocess.CalledProcessError: | ||
| # Log a warning so the operator knows AVIF was requested but unavailable. | ||
| print(f"::warning::AVIF requested for {relative_path} but libsvtav1 encode failed; falling back to WebP.") | ||
| p_avif.unlink(missing_ok=True) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
jpeg_avif_enabled: falsein.github/resource-optimizer/config.json— libsvtav1 is not available on CI runners, so AVIF will never be produced; disabling the flag removes the notice entirely